from rest_framework.permissions import IsAuthenticated
from utils.base import BasePageNumberPagination
from apps.elements.filters import ElementFilter
from apps.elements.models import Element
from apps.elements.serializers import ElementSerializers
from utils.base_view import BaseModelViewSet


class ElementViewSet(BaseModelViewSet):
    serializer_class = ElementSerializers
    queryset = Element.objects.all()
    permission_classes = [IsAuthenticated]
    pagination_class = BasePageNumberPagination
    filterset_class = ElementFilter
